{% extends ../base.html %} 
{% block title %}
<title>资讯交流 | 投资智慧</title>
{% end %} 
{% block js_css %}
<link type="text/css" rel="stylesheet" href="{{static_url('css/quote/quote.css')}}"/>
<script type="text/javascript" src="{{static_url('js/d3/d3.min.js')}}"></script>
<script src="{{static_url('js/websock.js')}}"></script>
<script src="{{static_url('js/quote/utils.js')}}"></script> 
<script src="{{static_url('js/quote/quote.js')}}"></script> 
{% end %} 
{% block content %}
<div id="stockQuote" class="hide">
<div class="caption"><span>新都酒店</span> <span>分时</span> <span>均线</span> <span>成交量</span> </div>
</div>
<div id="quotes" class="quotes">
<div id="header" class="clearfix header">
  	<span class="idx"> </span>
    <span class="code">代码</span>
    <span class="name">名称</span> 
    <span>涨幅%</span>
    <span>现价</span>
    <span>涨跌</span>
    <span>买入价</span>
    <span>卖出价</span> 
    <span>成交额 </span> 
    <span>换手%</span>
    <span>市盈率</span> 
    <span>今开</span>
    <span>昨收</span>
    <span>最高</span>
    <span>最低</span>
    <span>振幅%</span>
</div>
<div id="data" class="data">
<ul>
{% set i=0 %}
{% for q in quotes %}
	{% set i += 1 %}  
	{% set value = uniform(-0.1,0.1)*100 %}
  	<li id="{{q['code']}}" class="clearfix" onmousedown="q_line_clicked(this);" ondblclick="showStockQuote()">
  		 <span class="idx">{{i}}</span>
	     <span class="code">{{q.code}}</span>
	     <span class="name">{{q.name}}</span>	     
	     <span class="price-delta100 {{hq.css(q.price,q.closed)}}">{{hq.price_delta100(q)}}</span> <!-- 涨跌幅 -->
	     <span class="price {{hq.css(q.price,q.closed)}}">{{hq.price(q)}}</span>
	     <span class="price-delta {{hq.css(q.price,q.closed)}}">{{hq.price_delta(q)}}</span><!-- 涨跌额 -->
	     <span class="ask {{hq.css(q.buy1[1],q.closed)}}">{{hq.ask(q)}}</span>
	     <span class="bid {{hq.css(q.sell1[1],q.closed)}}">{{hq.bid(q)}}</span>
	     <span class="turnover">{{hq.turnover(q)}}</span> 
	     <span class="xrate">{{'%.2f'%(uniform(0,0.1)*100)}}</span>
	     <span class="pe">{{'%.1f'%(uniform(20,200))}}</span> 
	     <span class="open {{hq.css(q.open,q.closed)}}">{{hq.open(q)}}</span>
	     <span class="closed">{{q.closed}}</span>
	     <span class="highest {{hq.css(q.highest,q.closed)}}">{{hq.highest(q)}}</span>
	     <span class="lowest {{hq.css(q.lowest,q.closed)}}">{{hq.lowest(q)}}</span>
	     <span class="price-amp100">{{hq.price_amp100(q)}}</span>
 	</li> 
{% end %} 
</ul>
</div>

</div>


<div id="keyshot" class="keyshot hide">
	<input type="text" placeholder="键盘精灵-代码/简称">
	<ul>
	{% for i in range(10) %}
	<li>
	<span class="code">000031</span>
	<span class="name">中粮地产</span>
	</li>
	{% end %}
	</ul>
</div>
<div id="footer" class="footer"> 
<ul class="cats clearfix">
{%for i in range(len(categories)) %}
	{% set c = categories[i] %}
	{% if i==sel %}
	<li class="active">{{c}}</li>
	{% else %}
	<li>{{c}}</li>
	{% end %}
{% end %}
</ul> 
<div class="snapshot">
	<span class="block">
	    <span class="b">上证</span>
	    <span>2528.71</span> 
	    <span>+2.63</span>
	    <span>0.03%</span>
	    <span>276亿</span>
	</span>
  
   <span class="block">
    <span>深证</span>
    <span>10630.71</span> 
    <span>+42.20</span>
    <span>0.32%</span>
    <span>176亿</span>
   </span>
   
   <span class="block">
    <span>中小</span>
    <span>5365.12</span> 
    <span>+5.18</span>
    <span>0.32%</span>
    <span>136亿</span>
   </span>

</div>

</div>
    
	 
{% end %}
{% block footer %}
{% end %}